#===============================================
# Code written by Joe France (joeprogram.com)
# Released under code.google.com/p/video-scholar/
# with the MIT license (aka, the do-whatever-you-want-with-it license)
#===============================================

class AbstractGUI( object ):
	'''
	An interface for GUI elements to inherit from.
	GUI elements may either be a single element or a combination
	of mulitple elements.  By conforming to this interface, other
	objects don't have to care which they are.
	'''
	
	def set_coordinates( self, x = None, y = None ):
		'''
		Set the coordinates of the GUI
		Allows for None to be passed in for x or y
		in case you don't wish to change one of the variables
		'''
		
		raise Exception("PROBLEM: This method was called from an abstract class. SOLUTION: You need to implement this method in %s before calling it." % self.__class__.__name__ )
		
	def get_coordinates( self ):
		raise Exception("PROBLEM: This method was called from an abstract class. SOLUTION: You need to implement this method in %s before calling it." % self.__class__.__name__ )

	def get_height( self ):
		raise Exception("PROBLEM: This method was called from an abstract class. SOLUTION: You need to implement this method in %s before calling it." % self.__class__.__name__ )
		
	def get_width( self ):
		raise Exception("PROBLEM: This method was called from an abstract class. SOLUTION: You need to implement this method in %s before calling it." % self.__class__.__name__ )
		
	def draw( self ):
		'''
		How to draw this GUI element upon the screen
		'''
		raise Exception("PROBLEM: This method was called from an abstract class. SOLUTION: You need to implement this method in %s before calling it." % self.__class__.__name__ )
		
	def hit_test( self, x, y ):
		'''
		Returns true if the provided x and y coordinates intersect with this GUI
		'''
		raise Exception("PROBLEM: This method was called from an abstract class. SOLUTION: You need to implement this method in %s before calling it." % self.__class__.__name__ )
		
	def mouse_over( self, x, y ):
		'''
		Called if the mouse has entered the hit area of this gui
		'''
		raise Exception("PROBLEM: This method was called from an abstract class. SOLUTION: You need to implement this method in %s before calling it." % self.__class__.__name__ )	
		
	def mouse_out( self, x, y ):
		'''
		Called if the mouse has left the hit area of htis gui.
		'''
		raise Exception("PROBLEM: This method was called from an abstract class. SOLUTION: You need to implement this method in %s before calling it." % self.__class__.__name__ )	
		
	def mouse_press( self, x, y, button, modifiers ):
	
		raise Exception("PROBLEM: This method was called from an abstract class. SOLUTION: You need to implement this method in %s before calling it." % self.__class__.__name__ )	